<?php
//魔道多次请求， 从flow_request_queue 找到相关的请求，并发送失败信息，删除存储在redis里的数据 
$redis = new Redis ();
$redis->connect ( "127.0.0.1", "6379" );
 $redis->select(1);

$queuedatas = $redis->lrange ('flow_request_queue',0,-1 ); // array

print_r($queuedatas);
//while  (list($key,$value) = each ($switchs)){
while  ( $value  = each ($switchs)){

$phonenum = $redis->hget ($value ,'phonenum');
$callback = $redis->hget ($value ,'callback');
$code     = $redis->hget ($value ,'code');
$ordersn  = $redis->hget ($value , 'ordersn');

echo  $callback."?state=0&ordersn=".$ordersn."&errorcode='wrong'  phonenum=".$phonenum."code=".$code.$value;

//$redis->lrem('flow_request_queue',1,$value);
//$redis->del($value);




}

